// 警惕 BDFZ 远古编译器。请确保你的代码在 `-std=c++11` 下编译没有错误或警告。
#include<bits/stdc++.h>
#define int long long
#define rep(i,a,b) for(int i(a);i<=(b);++i)
#define req(i,a,b) for(int i(a);i>=(b);--i)
#define sort stable_sort
using namespace std;
char buf[1<<23],*p1=buf,*p2=buf;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
template<typename TP> inline TP read(TP &num)
{
	TP x=0;
	int f=0;
	char ch=getchar();
	while(ch<48||ch>57) f|=ch=='-',ch=getchar();
	while(48<=ch&&ch<=57) x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return num=f?-x:x;
}
template<typename TP> inline void write(TP x)
{
	(x<0)?(putchar('-'),x=-x):0;
	(x>9)?(write(x/10),0):0;
	putchar((x%10)^48);
}
template<typename TP> inline void writeln(TP x)
{
	write<TP>(x);
	puts("");
}
const long double unit=1,eps=1e-9;
int n,k,a[1000001],b[1000001];
long double p[1000001],ans;
signed main()
{
	freopen("sleep.in","r",stdin);
	freopen("sleep.out","w",stdout);
	read(n),read(k);
	rep(i,1,n) read(a[i]),read(b[i]),p[i]=unit*a[i]/b[i];
	sort(p+1,p+n+1);
	vector<long double> pp;
	pp.push_back(p[n]);
	rep(i,1,k-1) pp.push_back(p[i]);
	req(i,k-1,1)
	{
		ans+=pp[i];
		ans*=1-pp[i-1];
	}
	printf("%.10Lf\n",ans);
	/*vector<int> per(n); iota(per.begin(),per.end(),1);
	long double res=1+eps; vector<vector<int>> ans;
	do
	{
		long double prob=0;
		req(i,n-1,1)
		{
			prob+=p[per[i]];
			prob*=1-p[per[i-1]];
		}
//		for(auto x:per) cout<<x<<" ";
//		cout<<": "<<prob<<endl;
		if(prob+eps<res) res=prob,ans.clear(),ans.push_back(per);
		else if(fabs(prob-res)<eps) ans.push_back(per);
	} while(next_permutation(per.begin(),per.end()));
	cout<<"Min probability: "<<res<<endl;
	sort(ans.begin(),ans.end());
	for(auto x:ans)
	{
		for(auto y:x) cout<<p[y]<<" ";
		cout<<endl;
	}*/
	return 0;
}
